﻿using Rainbow.core;
using Rainbow.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Rainbow.view
{
    /// <summary>
    /// AboutDlg.xaml 的交互逻辑
    /// </summary>
    public partial class AboutDlg : Window
    {
        private AboutDlgViewModel windowViewModel = null;

        public AboutDlg()
        {

            InitializeComponent();
            windowViewModel = new AboutDlgViewModel();
            this.DataContext = windowViewModel;//添加上下文

            this.btnOK.Click += new RoutedEventHandler(Close_Click);

        }
        private void Close_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

    }

    public class AboutDlgViewModel : ViewModelBase
    {
        public AboutDlgViewModel() {
            verson = TW_App.VERSION;
            project_name = TW_App.PROJECT_NAME;
        }

        private string m_verson;
        public string verson
        {
            get { return m_verson; }
            set
            {
                m_verson = value;
            }

        }

        private string m_project_name;
        public string project_name
        {
            get { return m_project_name; }
            set
            {
                m_project_name = value;
            }

        }

    }
}
